#!/usr/bin/perl
use Getopt::Std;
use DBI;
use DBD::Oracle;
my %hash=();
getopts(":i:b:u:s:S:",\%hash);
$oracle_server="$hash{i}";
$oracle_sid="$hash{S}";
$oracle_port="1521";
$oracle_user="$hash{u}";
$oracle_password="$hash{s}";
my $conexao = DBI->connect("dbi:Oracle:host=$oracle_server;port=$oracle_port;sid=$oracle_sid",$oracle_user, $oracle_password);
my $busca = $conexao->prepare("SELECT * FROM USERS");
$busca->execute();
        print("\tNome completo    Login\n\n");
        while ( my @data = $busca->fetchrow_array() )
        {
        my $nome = $data[1];
        my $login = $data[4];
        print "\t$nome: $login\n";
        }
$busca->finish;
$conexao->disconnect;

